<script>
import { Select, Option } from 'element-ui'
export default {
  props: {
    options: {
      type: Array,
      default: () => [],
    },
    value: {},
  },
  render(h) {
    return h(
      Select,
      {
        on: this.$listeners,
        attrs: this.$attrs,
        props: {
          value: this.value,
        },
        scopedSlots: this.$scopedSlots,
      },
      this.options.map((op) =>
        h(Option, {
          props: {
            key: op.value,
            label: op.label,
            value: op.value,
          },
        }),
      ),
    )
  },
}
</script>
